{extend name="common/layout" /}

{block name="style"}{/block}

{block name="content"}

<link href="__SHOP_DEFAULT__/css/index.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__SHOP_DEFAULT__/custom/css/font-family.css">
<link rel="stylesheet" href="__SHOP_DEFAULT__/custom/css/layui.css">
<link rel="stylesheet" href="__SHOP_DEFAULT__/custom/css/iconfont.css">
<link rel="stylesheet" href="__SHOP_DEFAULT__/custom/css/info.css">
<link rel="stylesheet" href="__SHOP_DEFAULT__/custom/css/market.css">


<script type="text/javascript" src="__SHOP_RESOURCE__/js/home_index.js" charset="utf-8"></script>
<div class="info-banner-L" style="position: relative;margin-top: 0;">
        <ul class="full-screen-slides m-fbx">
            {if (!empty($index_slide_imgs) && is_array($index_slide_imgs))}
                {foreach $index_slide_imgs as $key => $val_}
                    <li style="background: url('__UPLOAD_PATH__/shop/adv/{$val_['adv_content']['adv_pic']}') no-repeat center top">
                        <a href="{$val_['adv_content']['adv_pic_url']}" target="_blank" title="{$val_['adv_title']}">&nbsp;</a>
                    </li>
                   
                {/foreach}
            {/if}
        </ul>
   </div>
<div class="container">
	<!--大图轮播-->
	
	
	<div class="nonstop">
        <dl>
            <!--<dt>点击品牌名称直达报价：</dt>-->
            <dt>合作品牌：</dt>
            <?php if(is_array($brand_list_market)){ $i=0; ?>
				<?php foreach($brand_list_market as $key=>$val){ $i++; ?>
					<?php if($i > 15){break;} ?>
                    <dd>
                    	<a href="{:url('shop/Brand/brand_goods',array('brand'=>$val['brand_id']))}">
                            <?php echo $val['brand_name']; ?>
                        </a>
                    </dd>
            	<?php }?>
			<?php }?>
        </dl>
    </div>
    <div class="clearfix"></div>
    
    <div class="three-top">
        <div class="today">
            <div class="info-title">
                <div class="title-icon">
                    <img src="__SHOP_DEFAULT__/custom/images/icon/info-title.png" alt="">
                    今日更新
                </div>
            </div>
            <div class="gongGao-p">
            	<?php if(is_array($update_article_market)){ $i=0; ?>
    				<?php foreach($update_article_market as $key=>$val){ $i++; ?>
    					<?php if($i > 10){break;} ?>
                		<p>
                			<a href="{:url('cms/Cmsmarket/market_detail',array('article_id'=> $val['article_id']))}">
                				<i class="icon kangle-icon">&#xe63f;</i><?php echo $val['article_title']; ?>
                			</a>
                		</p>
            		<?php } ?>
            	<?php } ?>
            
            </div>
        </div>
        <div class="today">
            <div class="info-title">
                <div class="title-icon">
                    <img src="__SHOP_DEFAULT__/custom/images/icon/info-title.png">
                    合作品牌
                </div>
            </div>
            <div class="market-brand">
                <h2>康乐茶网合作品牌</h2>
                <div class="brand-block">
                    <ul>
                    	<?php if(is_array($brand_list_market)){ $i=0; ?>
    						<?php foreach($brand_list_market as $key=>$val){ $i++; ?>
	    						<?php if($i > 15){break;} ?>
		                        <li>
		                        	<a href="{:url('shop/Brand/brand_goods',array('brand'=>$val['brand_id']))}">
		                                <img src="{$val['brand_pic']}" alt="<?php echo $val['brand_name'];?>">
		                                <span><?php echo $val['brand_name'];?></span>
		                            </a>
		                        </li>
                        	<?php }?>
        				<?php }?>
                    </ul>
                </div>
            </div>
        </div>
        <div class="today">
            <div class="info-title">
                <div class="title-icon">
                    <img src="__SHOP_DEFAULT__/custom/images/icon/info-title.png" alt="">
                    精彩推荐
                </div>
            </div>
            <div class="gongGao-p">
            	<?php if(is_array($hot_article_market)){ $i=0; ?>
    				<?php foreach($hot_article_market as $key=>$val){ $i++; ?>
    					<?php if($i > 10){break;} ?>
                		<p>
                			<a href="{:url('cms/Cmsmarket/market_detail',array('article_id'=> $val['article_id']))}">
                				<i class="icon kangle-icon">&#xe63f;</i><?php echo $val['article_title']; ?>
                			</a>
                		</p>
            		<?php } ?>
            	<?php } ?>
            </div>
        </div>
        
        <?php if(is_array($article_list_market)){ ?>
    		<?php foreach($article_list_market as $key=>$val){ ?>
    			<div class="today brand-chunk">
		            <div class="info-title">
		                <div class="title-icon">
		                    <img src="__SHOP_DEFAULT__/custom/images/icon/info-title.png" alt="">
		                    <?php echo $val['class_name']; ?>
		                </div>
		                <a href="{:url('cms/Cmsmarket/market_list',array('class_id'=> $val['class_id']))}" class="title-more">更多>></a>
		            </div>
		            <div class="img-text">
		                <div class="media">
		                	<?php if($val['class_id_sub'] && is_array($val['class_id_sub'][0])){ ?>
			                    <div class="media-left">
			                        <a href="{:url('cms/Cmsmarket/market_detail',array('article_id'=> $val['class_id_sub'][0]['article_id']))}">

										<img alt="<?php echo $val['class_id_sub'][0]['article_title']; ?>" src="<?php echo getCMSArticleImageUrl($val['class_id_sub'][0]['article_attachment_path'], $val['class_id_sub'][0]['article_image'], 'list');?>">
			                           
			                       	</a>
			                    </div>
			                    <a href="{:url('cms/Cmsmarket/market_detail',array('article_id'=> $val['class_id_sub'][0]['article_id']))}" class="media-body">
			                        <h4 class="media-heading"><?php echo $val['class_id_sub'][0]['article_title']; ?></h4>
			                        <div class="media-text"><p><?php echo $val['class_id_sub'][0]['article_abstract'];?></p></div>
			                    </a>
		                    <?php }?>
		                </div>
		            </div>
		            <div class="gongGao-p">
			            <?php if(is_array($val['class_id_sub'])){ $i=0; ?>
			            	<?php foreach($val['class_id_sub'] as $k=>$v){ $i++; ?>
					            <?php 
					            	if($i == 1){continue;}
					            	if($i > 4){break;}
					            ?>
					            <p>
					            	<a href="{:url('cms/Cmsmarket/market_detail',array('article_id'=> $v['article_id']))}">
					            		<i class="icon kangle-icon"></i><?php echo $v['article_title']; ?>
					            	</a>
					            </p>
			        		<?php }?>
	        			<?php }?>
        			</div>
		        
		        </div>
    			
        	<?php }?>
        <?php }?>

    </div>
    
</div>
	
{/block}